package com.wu.d5_lambda;

import static sun.misc.PostVMInitHook.run;

public class test {
    public static void main(String[] args) {
//        animal a =new animal(){
//            @Override
//            public void run(){
//                System.out.println("dog run");
//            }
//        };
//        a.run();
//      swimming s =  new  swimming(){
//          @Override
//          public void swim(){
//              System.out.println("student swimming");
//          }
//      };
//      s.swim();

      swimming s =()->{
          System.out.println("hello");
      };
      s.swim();


    }
}

interface swimming{
    void swim();
}

abstract class animal{
    public abstract void run();

}

